import Vue from 'vue'
import Antd from 'ant-design-vue'
import App from './App.vue'
import Bignumber from 'bignumber.js'
import router from './router'
import store from './store'

import 'ant-design-vue/dist/antd.less'
import './assets/styles/reset.css'
import '@/icons'

import './permission'

Vue.config.productionTip = false

Vue.filter('formatAmount', function (value) {
  value = value || 0
  Bignumber.config({
    FORMAT: {
      decimalSeparator: '.',
      groupSeparator: ',',
      groupSize: 3,
      secondaryGroupSize: 0,
      fractionGroupSeparator: ' ',
      fractionGroupSize: 0
    }
  })
  return new Bignumber(value).toFormat()
})

Vue.use(Antd)
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
